from globally import CVEFile
import openpyxl
import re




def read_kysalist_from_file(file):
    kysa_list = []
    with open(file, 'r', encoding="UTF-8") as f:
        info = f.read().split("\n")
    for line in info:
        pattern = r"allTitle=(KYSA-\d+-\d+)"
        match = re.search(pattern, line)
        if match:
            kysa_id = match.group(1)  # 提取括号内的分组
            kysa_list.append(kysa_id)
    return kysa_list
